<?php

$q = strtolower($_GET["q"]);
if (!$q) return;

include('includes/connect.php');	// include your code to connect to DB.

$tbl_name="product";

$query = "SELECT * FROM $tbl_name";

$data = mysql_query($query);

while( $row = mysql_fetch_array( $data )){
    if ( strpos( strtolower( $row['productnaam'] ), $q ) !== false ) {
        echo $row['productnaam']  . "\n";
    }
}

?>